import request from "@/utils/request";

// 查询运费列表
export function listCost(query) {
  return request({
    url: "/admin/cost/getList",
    method: "get",
    params: query,
  });
}

// 查询运费详细
export function getCost(id) {
  return request({
    url: "/admin/cost/" + id,
    method: "get",
  });
}

// 新增运费
export function addCost(data) {
  return request({
    url: "/admin/cost",
    method: "post",
    data: data,
  });
}

// 修改运费
export function updateCost(data) {
  return request({
    url: "/admin/cost",
    method: "put",
    data: data,
  });
}

// 删除运费
export function delCost(id) {
  return request({
    url: "/admin/cost/" + id,
    method: "delete",
  });
}

export function saveCost(data) {
  return request({
    url: "/admin/cost/save",
    method: "post",
    data: data,
  });
}
